// 清除默认样式
*{
  margin: 0;
  padding: 0;
  // 改变盒子模型的计算方式
  box-sizing: border-box;
}
body{
  font: bold 20px "Courier";
}

#main{
  display: flex;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  width: 360px;
  height: 420px;
  background-color: #b7d4a9;
  border: 10px solid black;
  border-radius: 5%;
  flex-flow: column;
  align-items: center;
  justify-content: space-evenly;


  #stage{
    position: relative;
    width: 304px;
    height: 304px;
    border: 2px solid black;

    // 设置蛇的样式
    #snake{
      &>div{
        position: absolute;
        width: 10px;
        height: 10px;
        background-color: #000;
        border: 1px solid #b7d4a9;
      }
    }

    // 设置食物的样式
    #food{
      display: flex;
      position: absolute;
      width: 10px;
      height: 10px;
      left: 50px;
      top: 50px;
      flex-flow: row wrap;
      // 设置主轴和侧轴之间的空白分配到元素之间
      justify-content: space-between;
      align-content: space-between;

      &>div{
        width: 4px;
        height: 4px;
        background-color: #000;
        transform: rotate(45deg);
      }
    }
  }

  #panel{
    width: 304px;
    display: flex;
    justify-content: space-between;

  }
}